<template>
  <div>
    <a-carousel
      :after-change="onChange"
      dot-position="top"
      effect="fade"
      autoplay
      arrows
    >
      <div>
        <h3>1</h3>
      </div>
      <div>
        <h3>2</h3>
      </div>
      <div>
        <h3>3</h3>
      </div>
      <div>
        <h3>4</h3>
      </div>
      <template #prevArrow>
        <div
          class="custom-slick-arrow"
          style="left: 10px; z-index: 1"
        >
          左
        </div>
      </template>
      <template #nextArrow>
        <div
          class="custom-slick-arrow"
          style="right: 10px"
        >
          右
        </div>
      </template>
    </a-carousel>
  </div>
</template>

<script>
export default {
  name: '',
  components: {},
  data() {
    return {
    }
  },
  created() { },
  mounted() { },
  methods: {
    onChange() {

    }
  },
  computed: {}
}
</script>
<style scoped lang='scss'>
.ant-carousel :deep(.slick-slide) {
  text-align: center;
  height: 160px;
  line-height: 160px;
  background: #364d79;
  overflow: hidden;
}

.ant-carousel :deep(.slick-arrow.custom-slick-arrow) {
  width: 25px;
  height: 25px;
  font-size: 25px;
  color: #fff;
  background-color: rgba(31, 45, 61, 0.11);
  opacity: 0.3;
  z-index: 1;
}
.ant-carousel :deep(.custom-slick-arrow:before) {
  display: none;
}
.ant-carousel :deep(.custom-slick-arrow:hover) {
  opacity: 0.5;
}

.ant-carousel :deep(.slick-slide h3) {
  color: #fff;
}
</style>
